/**
 * antd面包屑导航封装 created to by doujiabao
 */

import React, { PureComponent } from 'react'

import { Breadcrumb } from 'antd'

class Breadcrumbv extends PureComponent {
    render() {
        const {
            pathSnippets,
            separator,
            className
        } = this.props
        return (<Breadcrumb className={className} separator={separator}>
            {pathSnippets.map((itm, idx) => (<Breadcrumb.Item key={idx}>{itm}</Breadcrumb.Item>))}
        </Breadcrumb>)
    }
}

Breadcrumbv.defaultProps = {
    //path
    pathSnippets: [],
    //拼接符
    separator: '>'
}

export default Breadcrumbv